export const schema = {
    type: "page",
    title: "参加的团队",
    body: [
        {
            type: "nav",
            stacked: false,
            links: [
                {
                    label: "查看",
                    to: "/volunteer/view/${id}"
                },
                {
                    label: "编辑",
                    visibleOn: 'acl.can("volunteer:edit")',
                    to: "/volunteer/edit/${id}",
                },
                {
                    label: "参加的项目",
                    to: "/volunteer/project/${id}"
                },
                {
                    label: "参加的团队",
                    to: "/volunteer/team/${id}"
                }
            ]
        },
        {
            type: "wrapper",
            className: "b-l b-b b-r bg-white no-padder",
            body: {
                type: "crud",
                api: "/api/volunteer/team/${id}",
                primaryField: 'id',
                columns: [
                    {
                        name: "id",
                        label: "团队ID",
                        width: 50
                    },
                    {
                        name: "team.name",
                        label: "团队名称",
                    },

                    {
                        label: "地址",
                        innerClassName: 'w',
                        type: "tpl",
                        tpl: "${team.province_name} ${team.city_name} ${team.county_name} ${team.addr}"
                    },

                    {
                        label: "团队联系人",
                        name: 'team.contact_name'
                    },
                    {
                        label: "联系方式",
                        name: 'team.contact_phone'
                    },
                    {
                        label: "加入时间",
                        name: 'created_at',
                        type: 'tpl',
                        tpl: "${created_at|date:LL:YYYY-MM-DD HH:mm:ss}"
                    },
                ]
            }
        }
    ]
};
